<?php 
	// No direct access
	defined('_JEXEC') or die;
	
  	$menu = JFactory::getApplication()->getMenu();
	$item = $menu->getActive();
	$params = new JParameter($item->params);
?>

<div class="appPhonePortrait">
	<div class="appMainImage">
		<?php //include_once 'includes/ads/ads_160x600.php';?>
		<?php include_once 'includes/categories/categories.php';?>
		<?php include_once 'includes/tophit/tophit.html';?>
	</div>
	<div class="appTop100Cont">
		<h1><strong><?php echo $params->get('page_heading'); ?></strong></h1>
		<?php if(count($this->items) > 0): ?>
		<?php foreach ($this->items as $key => $row): ?>
			<div class="appTop100">
				<h2><a href="<?php echo JRoute::_('index.php?option=com_apkipas&view=detail&id='.$row->title_id.':'.$row->alias.'&Itemid=107'); ?>"><?php echo $row->main_title ?></a></h2>
				<p>
					<a href="<?php echo JRoute::_('index.php?option=com_apkipas&view=detail&id='.$row->title_id.':'.$row->alias.'&Itemid=107'); ?>"><img src="<?php echo $row->bg; ?>"></a>
					<?php echo ApkipasHelper::wordLimit($row->des); ?>
				</p>
			</div>
			<?php if($key == 2): ?>
				<?php //include_once 'includes/ads/ads1_728x90.php';?>
			<?php endif;?>
		<?php endforeach; ?>
		
		<?php if($this->pagination->getPagesLinks()): ?>
		<div class="pagination">
			<?php echo $this->pagination->getPagesLinks(); ?>
		</div>
		<?php endif; ?>
		
		<?php else: ?>
			<div class="appTop100">
				<h2>No Record</h2>
			</div>
		<?php endif; ?>
	</div>
</div>
